//
//  ControlViewController.m
//  Anyair
//
//  Created by karlcool on 14-6-3.
//  Copyright (c) 2014年 Karlcool. All rights reserved.
//

#import "ControlViewController.h"

@interface ControlViewController ()

@end

@implementation ControlViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    LRTopBar* topBar = [[LRTopBar alloc]initWithTitle:@"控制台" AndLeftText:@"返回" AndRightText:@"刷新"];
    topBar.delegete = self;
    [self.view addSubview:topBar];
    
    controlTextView = [[UITextView alloc]initWithFrame:CGRectMake(0, 64, 320, 504)];
    controlTextView.backgroundColor = [UIColor blackColor];
    controlTextView.textColor = [UIColor whiteColor];
    controlTextView.font = [UIFont systemFontOfSize:14];
    controlTextView.text = [LRUserManager createManager].controlStr;
    [self.view addSubview:controlTextView];

}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



#pragma mark - 顶栏代理
#pragma mark - 退出数据界面
- (void)clickLeft:(UIButton*)sender {
    
    [self.navigationController popViewControllerAnimated:YES];
    
}
#pragma mark - 展开侧边栏
- (void)clickRight:(UIButton*)sender {
    controlTextView.text = [LRUserManager createManager].controlStr;
}

@end
